/**
 * 商品品类
 */
const mongoose = require("mongoose")

const GoodsSchema = new mongoose.Schema({
    category: String, //商品种类
    material: String, //材质
    appliedBottle: String, //适用规格
    exclusiveBottle: String, //专属规格
    packingSize: Number, //包装规格 kg
    taste: String, //口味
    specialFunction: String, //特殊功用
    placeOfOrigin: String, //产地
    productionDate: Date, //生产日期
    expirationDate: Number, //保质期 月
    declare: String, //特色说明
    price: Number, //销售价格
    picture: String, //商品图片
}, {
        versionKey: false,
        timestamps: {
            createdAt: 'createTime',
            updatedAt: 'updateTime'
        } //自动管理修改时间
    })

module.exports = mongoose.model("Goods", GoodsSchema);